import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

import UiLogin from '../ui/login.vue'
import UiIndex from '../ui/index.vue'
import UiIndexHome from '../ui/model/home.vue'
import UiIndexHeat from '../ui/model/heat.vue'
import UiIndexTag from '../ui/model/tag.vue'
import UiIndexCate from '../ui/model/cate.vue'

// admin

import adminLogin from '../admin/login.vue'
import adminIndex from '../admin/index.vue'
// admin baseData
import admGame from '../admin/modules/baseData/game.vue'
import admComonCode from '../admin/modules/baseData/commonCode.vue'
import admDataDict from '../admin/modules/baseData/dataDict.vue'
// admin regist
import admDelegation from '../admin/modules/reg/delegation.vue'
import admAthlete from '../admin/modules/reg/athlete.vue'
import admRegComp from '../admin/modules/reg/regcomp.vue'

import admVenue from '../admin/modules/baseData/venue.vue'
import admSport from '../admin/modules/baseData/sport.vue'
import admJudge from '../admin/modules/baseData/judge.vue'

// against
import db from '../against/db.vue'
import against from '../against/against.vue'

// fe2030
import fetsIndex from '../fe2301/modules/fetsIndex.vue'
import fetsMatchList from '../fe2301/modules/feMatchList.vue'
import feAthList from '../fe2301/modules/feAthList.vue'
import fetsTsInfo from '../fe2301/modules/feTsInfo.vue'
import fetsSCB from '../fe2301/modules/feSCB.vue'

Vue.use(VueRouter)

const routes = [{
  path: '/',
  name: 'Home',
  component: Home
}, {
  path: '/against',
  name: 'against',
  component: against
}, {
  path: '/db',
  name: 'db',
  component: db
}, {
  path: '/ui',
  name: 'uiLogin',
  component: UiLogin
}, {
  path: '/uiIndex',
  // name: 'UiIndex',
  component: UiIndex,
  children: [{
    path: 'home',
    component: UiIndexHome
  }, {
    path: 'heat',
    component: UiIndexHeat
  }, {
    path: 'tag',
    component: UiIndexTag
  }, {
    path: 'cate',
    component: UiIndexCate
  }]
}, {
  path: '/admin',
  name: 'admin',
  component: adminLogin
}, {
  path: '/adm',
  name: 'adminIndex',
  component: adminIndex,
  children: [{
    path: 'gameInfo',
    component: admGame
  }, {
    path: 'commonCode',
    component: admComonCode
  }, {
    path: 'dataDict',
    component: admDataDict
  }, {
    path: 'sport',
    component: admSport
  }, {
    path: 'delegation',
    component: admDelegation
  }, {
    path: 'athlete',
    component: admAthlete
  }, {
    path: 'particData',
    component: admRegComp
  }]
}, {
  path: '/fets/index',
  component: fetsIndex
}, {
  path: '/fets/matchList',
  component: fetsMatchList
}, {
  path: '/fets/athList',
  component: feAthList
}, {
  path: '/fets/tsInfo',
  component: fetsTsInfo
}, {
  path: '/fets/tsSCB',
  component: fetsSCB
}]

const router = new VueRouter({
  routes,
  mode: 'history'
})

export default router
